<html>
<head><meta charset="utf-8"><title>Seperate aggregate vs scalar transmutation · project-safe-transmute · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/216762-project-safe-transmute/index.html">project-safe-transmute</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/216762-project-safe-transmute/topic/Seperate.20aggregate.20vs.20scalar.20transmutation.html">Seperate aggregate vs scalar transmutation</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="213676340"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216762-project-safe-transmute/topic/Seperate%20aggregate%20vs%20scalar%20transmutation/near/213676340" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Quy Nguyen <a href="https://rust-lang.github.io/zulip_archive/stream/216762-project-safe-transmute/topic/Seperate.20aggregate.20vs.20scalar.20transmutation.html#213676340">(Oct 17 2020 at 23:36)</a>:</h4>
<p>I'm beginning to think that we need to seperate aggregate and scalar transmutation. Consider a struct like so:</p>
<div class="codehilite"><pre><span></span><code>struct Foo(u64); //but has an Archetype of u8
struct Example { // has a derived Archetype of [u8; 2]
    a: Foo,
    b: Foo,
}
</code></pre></div>


<p>A derive for this would use the Archetype of <code>[u8; 2]</code>, unless I'm reading <a href="https://github.com/rust-lang/rfcs/pull/2981#issuecomment-710045236">this</a> wrong, which makes 0 sense.</p>



<a name="213676731"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216762-project-safe-transmute/topic/Seperate%20aggregate%20vs%20scalar%20transmutation/near/213676731" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Wrenn <a href="https://rust-lang.github.io/zulip_archive/stream/216762-project-safe-transmute/topic/Seperate.20aggregate.20vs.20scalar.20transmutation.html#213676731">(Oct 17 2020 at 23:44)</a>:</h4>
<p>FYI, stability archetypes got ripped out of the RFC.</p>



<a name="213676837"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216762-project-safe-transmute/topic/Seperate%20aggregate%20vs%20scalar%20transmutation/near/213676837" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Quy Nguyen <a href="https://rust-lang.github.io/zulip_archive/stream/216762-project-safe-transmute/topic/Seperate.20aggregate.20vs.20scalar.20transmutation.html#213676837">(Oct 17 2020 at 23:47)</a>:</h4>
<p>Arghhh that's what I get for not reading closely :p. Is it just Self now?</p>



<a name="213676940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216762-project-safe-transmute/topic/Seperate%20aggregate%20vs%20scalar%20transmutation/near/213676940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Wrenn <a href="https://rust-lang.github.io/zulip_archive/stream/216762-project-safe-transmute/topic/Seperate.20aggregate.20vs.20scalar.20transmutation.html#213676940">(Oct 17 2020 at 23:49)</a>:</h4>
<p>No, totally gone. (For this sort of reason.) There are a lot of tricky tradeoffs in designing a layout stability system, and no obviously right way.</p>



<a name="213679633"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216762-project-safe-transmute/topic/Seperate%20aggregate%20vs%20scalar%20transmutation/near/213679633" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Quy Nguyen <a href="https://rust-lang.github.io/zulip_archive/stream/216762-project-safe-transmute/topic/Seperate.20aggregate.20vs.20scalar.20transmutation.html#213679633">(Oct 18 2020 at 00:55)</a>:</h4>
<p>That's a drastic reduction in API surface area then. I guess the only point of contention is <code>Here!()</code> now...</p>



<a name="213679640"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/216762-project-safe-transmute/topic/Seperate%20aggregate%20vs%20scalar%20transmutation/near/213679640" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Wrenn <a href="https://rust-lang.github.io/zulip_archive/stream/216762-project-safe-transmute/topic/Seperate.20aggregate.20vs.20scalar.20transmutation.html#213679640">(Oct 18 2020 at 00:55)</a>:</h4>
<p>Yup.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>